<%-- 
    Document   : test
    Created on : Sep 9, 2011, 4:29:14 AM
    Author     : northpole
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="user.User" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="sidebar.css" media="screen" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Profile Page</title>

    </head>
    <body>
        <div style="z-index: 100%;">
        <a href="index.jsp" >Go Back
<img src="imadge/pixel-mario.gif" alt="HTML tutorial" width="32" height="32" />
</a>
        </div>
            <div id="text" >

            <form action="registerUser.jsp" method="GET">
                <li>
                    <ul>
                        <%if (request.getParameter("username") != null) {%>
                        Username:<input type="text" name="username" placeholder="your username" value="<%request.getParameter("username");%>"/> "
                        <%} else {%>
                        Username:<input type="text" name="username" placeholder="your username" />
                        <%}
                        %>
                    </ul>
                    <ul>Please give a safe password twice:
                        <%                          for (int i = 0; i < 2; i++) {
                  if (request.getParameter("password") != null) {%>
                        <input type="password" name="password" value="<%request.getParameter("password");%>"/>
                        <%} else {%>
                        <input type="password" name="password" placeholder="your password"/>
                        <%}
                                    }
                        %>
                    </ul><ul>
                        <%                        if (request.getParameter("name") != null) {
                                        out.write("Name:<input type=\"text\" name=\"name\" placeholder=\"your name\" value="
                                                + request.getParameter("name") + "/></br>");
                                    } else {
                                        out.write("Name:<input type=\"text\" name=\"name\" placeholder=\"your name\" /></br>");
                                    }
                        %>
                    </ul><ul>
                    <%      if (request.getParameter("surname") != null) {
                                    out.write("Surname:<input type=\"text\" name=\"surname\" placeholder=\"your surname\" value="
                                            + request.getParameter("surname") + "/></br>");
                                } else {
                                    out.write("Surname<input type=\"text\" name=\"surname\" placeholder=\"your surname\" /></br>");
                                }
                    %>
                    </ul><ul>
                        <%if (request.getParameter("dateOfBirth") != null) {
                                        out.write("Date Of Birth <input type=\"date\" name=\"dateOfBirth\" placeholder=\"your birh date\" value="
                                                + request.getParameter("dateOfBirth") + "></br>");
                                    } else {
                                        out.write("Date Of Birth <input type=\"date\" name=\"dateOfBirth\" placeholder=\"your birh date\" ></br>");
                            }%>
                    </ul>

                    <ul>
                        You can have up to 10 interests:
                        <% 
    if (request.getParameter("interests") != null && !request.getParameter("interests").isEmpty()) 
    { for (int i = 0; i < 10; i++) {
out.write(" <input type=\"text\" name=\"interests"+i+
"\" placeholder=\"your interest\" value=\""+request.getParameter("interests"+i)+"\"/>");    %>
                    </ul><ul>           </br>
                    </ul>
                    <% }
                    } else {
                        for (int i = 0; i < 10; i++) {
                            out.write("<input type=\"text\" name=\"interests"+i+"\" size=\"11\"/>");
                    %><ul></ul>
                        <% }
                                    }
                        %>
                    <ul>
                        A welcome text for other users:
                        <%if (request.getParameter("welcomeText") != null) {
                                        out.write(" <input type=\"text\" name=\"welcomeText\" placeholder=\"a welcome Text\" value="
                                                + request.getParameter("welcomeText") + "></br>");
                                    } else {
                                        out.write(" <input type=\"text\" name=\"welcomeText\" placeholder=\"a welcome Text\" ></br>");
                                    }
                        %>
                    </ul>>

                    <input type="submit" value="Submit" />
                </li>></form>
        </div>


    </body>
</html>